<div id="screen">
    <div id="urlInfo"></div>
</div>
<script type="text/javascript">
    $(document).ready(function(){
        <?php 
        if (sizeof($arrPhotos) > 0) 
        {
            $arrInit = array();
            foreach ($arrPhotos as $photo) {
                $arrInit[] = "{src:'".base_url()."photos/large/".$photo['url']."'}";
            }
            $strObject = implode(',', $arrInit);
        ?>
        m3D.init([<?php echo $strObject; ?>]);
        setTimeout("m3D.play(4000)", 2000);
        <?php } ?>
    });
</script>